package com.cimpm.project.controller;

import com.cimpm.project.entity.Project;
import com.cimpm.project.service.impl.ProjectServiceImpl;
import com.hby.common.annotation.aspect.AutoEntityProcess;
import com.hby.common.annotation.aspect.NoEntityAutoSingleProcess;
import com.hby.common.annotation.handler.AutoRequestBody;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("project")
@CrossOrigin
public class ProjectController {

    @RequestMapping("/project")
    @AutoEntityProcess(BUSINESS_CLASS = Project.class, LOG_MSG = "project", CUSTOM_EXECUTE = true, PERMISSION_TYPE = "5234")
    public Object projectAuto(@AutoRequestBody Map<String, Object> param) {
        return null;
    }

    @RequestMapping(value = "/getProjectTree")
    @NoEntityAutoSingleProcess(SERVICE_CLASS = ProjectServiceImpl.class, PARAM_FIELD = "", PERMISSION_TYPE = "5")
    public Object getProjectTree(@AutoRequestBody Map<String, Object> param) throws Exception {
        return null;
    }

    @ResponseBody
    @RequestMapping(value = "/export")
    @NoEntityAutoSingleProcess(SERVICE_CLASS = ProjectServiceImpl.class, PARAM_FIELD = "", PERMISSION_TYPE = "2")
    public void export(@AutoRequestBody Map<String, Object> param) throws Exception {
    }

}
